import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
  {
      title: '容器id',
      align: "center",
      dataIndex: 'containerId',
      resizable: true,
  },
  {
      title: '容器名称',
      align: "center",
      dataIndex: 'name'
  },
  {
      title: '容器节点',
      align: "center",
      dataIndex: 'nodeId'
  },
  {
      title: '容器端口映射',
      align: "center",
      dataIndex: 'ports'
  },
  {
      title: '描述',
      align: "center",
      dataIndex: 'description'
  },
  {
      title: '容器状态',
      align: "center",
      dataIndex: 'status',
  },
  {
      title: '容器基础镜像',
      align: "center",
      dataIndex: 'imageId'
  },
];

// 查询数据
// 自定义类型
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '描述',
    field: 'description',
    component: 'Input',
    dynamicRules: () => {
      return [
              { required: true, message: '请输入描述!'},
             ];
    },
  },
  {
    label: '此容器对应的基础镜像',
    field: 'imageId',
    component: 'Input',
    dynamicRules: () => {
      return [
              { required: true, message: '请输入此容器对应的基础镜像!'},
             ];
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
